/*
Audica Uploader - application for convenient uploading to various file hostings
Copyright (C) 2011-2012 Makarov Andrey (Winand)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "dbgform.h"
#include "ui_dbgform.h"
#include <QStandardItemModel>
#include <QTimer>

DbgForm::DbgForm(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::DbgForm)
{
    ui->setupUi(this);
    ui->lstmsg->setModel(new QStandardItemModel());
}

DbgForm::~DbgForm()
{
    delete ui->lstmsg->model();
    delete ui;
}

void DbgForm::addMessage(QString msg) {
    static QStandardItemModel* model = (QStandardItemModel*)ui->lstmsg->model();
    model->appendRow(new QStandardItem(msg));
}
